.umap-form-inline .formbox,
.umap-form-inline {
    display: inline;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="datetime-local"],
input[type="email"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="time"],
input[type="file"],
input[type="url"],
textarea {
    background-color: var(--color-light);
    border: 2px solid var(--color-darkBlue);
    color: var(--text-color);
    display: block;
    font-family: inherit;
    margin: 0;
    padding: .5rem 1rem;
    width: 100%;
    min-height: 40px;
}

input[type="range"] {
    margin-top: 10px;
    margin-bottom: 5px;
    width: 100%;
}

input[type="radio"] {
    margin-inline-end: var(--text-margin);
}

input[type="checkbox"] {
    margin: 0 var(--text-margin);
    vertical-align: middle;
    appearance: none;
}

input[type="checkbox"]:after {
    display: inline-block;
    content: ' ';
    width: 12px;
    height: 12px;
    border: 1px solid var(--color-veryLightGray);
    cursor: pointer;
    text-align: center;
    font-size: 1rem;
    line-height: 0.8rem;
}

input[type=checkbox]:checked:after {
    background-color: var(--color-lightCyan);
    content: '✓';
    color: var(--color-darkGray);
}

input[data-modified=true] {
    background-color: var(--color-lightCyan);
    border: 1px solid var(--color-veryDarkGray);
}

input+select,
select+input,
input+input {
    border-left: none;
}

textarea {
    height: inherit;
    padding: 7px;
    min-height: 15rem;
    min-height: 6rlh;
}

select {
    border: 2px solid var(--color-darkBlue);
    width: 100%;
    padding: var(--button-padding);
    background-color: var(--background-color);
    color: var(--text-color);
    min-height: 40px;
}

.dark select {
    color: var(--text-color);
    background-color: var(--color-darkGray);
    border-color: var(--color-veryDarkGray);
    border-width: 1px;
}

.dark select[disabled],
select[disabled] {
    background-color: var(--color-mediumGray);
    color: var(--color-veryLightGray);
    cursor: not-allowed;
}

select[multiple="multiple"] {
    height: auto;
}

.button,
[type="button"]:not(.icon),
input[type="submit"] {
    display: flex;
    align-items: center;
    text-align: center;
    cursor: pointer;
    padding: var(--button-padding);
    border: none;
    text-decoration: none;
    justify-content: center;
    background-color: var(--color-darkBlue);
    color: var(--color-light);
    font-weight: normal;
    min-height: 40px;
}

.dark .button,
.dark [type="button"] {
    background-color: var(--color-darkerGray);
    color: var(--text-color);
}

.dark menu .button,
.dark menu [type="button"] {
    border: 1px solid var(--color-veryLightGray);
}

.dark.umap-edit-bar .button,
.dark.umap-edit-bar [type="button"] {
    border: none;
}

.button.primary {
    font-weight: bold;
}

.dark .button.primary:not([disabled]),
.dark [type="button"].primary:not([disabled]) {
    background-color: var(--color-verySoftCyan);
    color: var(--color-dark);
    border: 1px solid var(--color-veryDarkGray);
}

.dark .anonymous,
.dark .button.anonymous,
.dark [type="button"].anonymous {
    background-color: var(--color-veryDarkerViolet);
    border: 1px solid var(--color-lightViolet);
}

.dark .button:hover,
.dark [type="button"]:hover,
.dark input[type="submit"]:hover {
    background-color: var(--color-mediumGray);
}

.dark .button.anonymous:hover,
.dark [type="button"].anonymous:hover {
    background-color: var(--color-veryDarkViolet);
}

.dark a {
    color: var(--color-verySoftCyan) !important;
}

.dark [type="button"][disabled],
.dark input[type="submit"][disabled] {
    background-color: var(--color-mediumGray);
    cursor: not-allowed;
}

button.flat,
[type="button"].flat {
    padding: 0;
    text-align: start;
    min-height: inherit;
    width: initial;
    display: initial;
}

button.flat,
[type="button"].flat,
.dark [type="button"].flat {
    border: none;
    background-color: inherit;
    color: var(--text-color);
}

button.flat:hover,
[type="button"].flat:hover,
.dark [type="button"].flat:hover {
    text-decoration: underline;
}

.dark button.round,
[type="button"].round,
button.round {
    border-radius: 20px;
    border: 0.5px solid rgba(153, 153, 153, 0.40);
}

.soft-round,
.dark button.soft-round,
button.soft-round {
    border-radius: var(--border-radius);
}

button.round.small {
    padding: var(--button-padding-small);
}

.help-text,
.helptext {
    display: block;
    padding: 7px 7px;
    margin-bottom: 14px;
    background: var(--color-mediumGray);
    color: var(--color-veryLightGray);
    font-size: 10px;
    border-radius: 0 2px;
}

.content .helptext {
    background-color: var(--color-veryLightGray);
    color: var(--color-dark);
}

input+.help-text {
    margin-top: -14px;
}

.formbox {
    min-height: 36px;
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: var(--gutter);
}

.formbox .formbox {
    margin-bottom: 0;
}

.formbox.with-switch {
    padding-top: 2px;
}

.with-switch {
    overflow: hidden;
}

fieldset.formbox {
    border: none;
    border-top: 1px solid var(--color-veryLightGray);
}

label {
    display: block;
    font-size: 12px;
    line-height: 21px;
    width: 100%;
}

label+label {
    margin-top: var(--box-margin);
}

.content label {
    font-weight: bold;
}

input[type="checkbox"]+label {
    display: inline;
    padding: 0 14px;
}

select+.error,
input+.error {
    display: block;
    padding: 7px 7px;
    margin-top: -14px;
    margin-bottom: 14px;
    background: var(--color-veryLightGray);
    color: var(--color-light);
    background-color: var(--color-red);
    font-size: 11px;
    border-radius: 0 2px;
}

input[type="file"]+.error {
    margin-top: 0;
}

input[value]:invalid {
    border-color: var(--color-red);
    background-color: var(--color-darkRed);
    color: var(--color-light);
}

.dark input,
.dark textarea {
    background-color: var(--color-darkerGray);
    border-color: var(--color-veryDarkGray);
    border-width: 1px;
    color: var(--color-veryLightGray);
}

details {
    margin-bottom: 5px;
    margin-top: 5px;
    border-start-start-radius: 4px;
    border-start-end-radius: 4px;
}

.dark details {
    border: 1px solid var(--color-veryDarkGray);
}

details fieldset {
    overflow: hidden;
    border: 1px solid var(--color-veryLightGray);
    margin: 0;
    padding: var(--text-margin);
}

details summary {
    cursor: pointer;
    background-color: var(--color-veryLightGray);
    font-size: 0.9rem;
    padding: var(--small-box-padding);
}

.dark details summary {
    background-color: var(--color-darkerGray);
    color: var(--color-light);
}

.dark details fieldset:not(.formbox) {
    border: 1px solid var(--color-darkGray);
}

summary h4 {
    display: inline;
}

fieldset legend {
    font-size: .9rem;
    padding: 0 5px;
}

fieldset.separator {
    border: none;
    border-top: 1px solid var(--color-veryLightGray);
}

[data-badge] {
    position: relative;
}

[data-badge]:after {
    position: absolute;
    inset-inline-end: -6px;
    top: -6px;
    min-width: 8px;
    min-height: 8px;
    line-height: 8px;
    padding: 2px;
    font-weight: bold;
    background-color: var(--color-accent);
    color: var(--color-darkBlue);
    text-align: center;
    font-size: .75rem;
    border-radius: 50%;
    content: attr(data-badge);
}

[hidden] {
    display: none !important;
}

/* Switch */
input.switch:empty {
    display: none;
}

input.switch:empty~label {
    white-space: nowrap;
    position: relative;
    float: inline-start;
    line-height: 2em;
    height: 2em;
    text-indent: 6em;
    margin: 0.2em 0;
    cursor: pointer;
    user-select: none;
    text-shadow: 0 1px rgba(0, 0, 0, 0.1);
    width: 80px;
}

input.switch:empty~label:before,
input.switch:empty~label:after {
    position: absolute;
    display: block;
    top: 0;
    bottom: 0;
    inset-inline-start: 0;
    content: ' ';
    width: 6em;
    -webkit-transition: all 100ms ease-in;
    transition: all 100ms ease-in;
    color: var(--color-mediumGray);
    font-weight: bold;
    background-color: var(--color-veryLightGray);
}

.dark input.switch:empty~label:before,
.dark input.switch:empty~label:after {
    background-color: var(--color-darkerGray);
}

input.switch:empty~label:after {
    width: 3em;
    margin-inline-start: 0.1em;
    background-color: var(--color-lightGray);
    content: "OFF";
    text-indent: 3.5em;
    border: 1px solid var(--color-darkerGray);
    font-weight: bold;
}

.dark input.switch:empty~label:after {
    border: 1px solid var(--color-veryDarkGray);
    background-color: var(--color-darkerGray);
    color: var(--color-veryLightGray);
}

input.switch:checked:empty~label:after {
    content: ' ';
}

.dark input.switch:checked~label:before,
input.switch:checked~label:before {
    background-color: var(--color-verySoftCyan);
    border: 1px solid var(--color-veryLightGray);
    color: var(--color-darkGray);
    content: "ON";
    text-indent: 0.7em;
    text-align: start;
    font-weight: bold;
}

.dark input.switch:checked~label:before {
    border: none;
    background-color: var(--color-verySoftCyan);
}

input.switch:checked~label:after {
    margin-inline-start: 3em;
}

.button-bar,
.umap-multiplechoice {
    margin-top: 5px;
    text-align: center;
    display: grid;
    width: 100%;
}

.button-bar {
    grid-gap: var(--gutter);
}

.umap-multiplechoice.by2,
.button-bar.by2,
.button-bar.half {
    grid-template-columns: 1fr 1fr;
    justify-items: center;
    width: calc(100% - var(--gutter) * 2);
}

.button-bar.by3,
.button-bar.by5,
.button-bar.by6,
.umap-multiplechoice.by3,
.umap-multiplechoice.by5,
.umap-multiplechoice.by6 {
    grid-template-columns: 1fr 1fr 1fr;
    width: calc(100% - var(--gutter) * 3);
}

.button-bar.by4,
.umap-multiplechoice.by4 {
    grid-template-columns: 1fr 1fr 1fr 1fr;
    width: calc(100% - var(--gutter) * 4);
}

.button-bar .button,
.button-bar [type="button"] {
    display: inline-block;
    width: 100%;
}

.umap-multiplechoice input[type='radio'] {
    display: none;
}

.umap-multiplechoice label {
    border: 1px solid var(--color-veryDarkGray);
    cursor: pointer;
    background-color: var(--color-veryLightGray);
    min-height: 30px;
    line-height: 30px;
    text-align: center;
    width: 100%;
    display: inline-block;
}

.dark .umap-multiplechoice label {
    border: 1px solid var(--color-veryDarkGray);
    background-color: var(--color-darkGray);
}

.umap-multiplechoice input[type='radio']:checked+label {
    background-color: var(--color-verySoftCyan);
    color: var(--color-darkGray);
}

.inheritable .header .buttons {
    padding: 0;
}

.inheritable .header {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    align-content: center;
    justify-content: space-between;
}

.inheritable .header label {
    padding-top: 6px;
    width: initial;
}

.inheritable+.inheritable {
    border-top: 1px solid var(--color-darkerGray);
    padding-top: 5px;
    margin-top: 5px;
}

.umap-field-iconUrl .action-button,
.inheritable .define,
.inheritable .undefine {
    width: initial;
    min-height: 18px;
    line-height: 18px;
    margin-bottom: 0;
}

.inheritable .define,
.inheritable.undefined .undefine,
.inheritable.undefined .show-on-defined {
    display: none;
}

.inheritable.undefined .define {
    display: block;
}

i.info {
    background-repeat: no-repeat;
    background-image: url('../img/16.svg');
    background-position: -170px -50px;
    display: inline-block;
    margin-inline-start: 5px;
    vertical-align: middle;
    width: 16px;
    height: 18px;
}

.dark i.info {
    background-image: url('../img/16-white.svg');
}

.umap-empty:before,
.umap-to-polygon:before,
.umap-clone:before,
.umap-edit:before,
.umap-download:before,
.umap-to-polyline:before {
    background-repeat: no-repeat;
    text-indent: 36px;
    height: 24px;
    line-height: 24px;
    display: inline-block;
    background-image: url('../img/24.svg');
    vertical-align: bottom;
    content: " ";
}

.dark .umap-empty:before,
.dark .umap-to-polygon:before,
.dark .umap-clone:before,
.dark .umap-edit:before,
.dark .umap-download:before,
.dark .umap-to-polyline:before {
    background-image: url('../img/24-white.svg');
    vertical-align: middle;
}

.umap-to-polygon:before {
    background-position: -72px -42px;
}

.umap-to-polyline:before {
    background-position: -106px -42px;
}

.umap-clone:before {
    background-position: -144px -78px;
}

.umap-empty:before {
    background-position: -108px -78px;
}

.umap-download:before {
    background-position: -72px -78px;
}

.umap-field-datalist {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    margin-top: -8px;
    padding: 0 5px;
}

.flat-tabs {
    display: flex;
    justify-content: space-around;
    font-size: 1.2rem;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--color-lighterGray);
}

.flat-tabs button.flat {
    padding: 10px;
    text-decoration: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-weight: bold;
}

.flat-tabs button.flat:hover,
.flat-tabs .flat.on {
    color: var(--color-verySoftCyan);
    border-bottom: 2px solid var(--color-verySoftCyan);
}

.dark .flat-tabs button.flat:hover {
    text-decoration: none;
}

.dark .flat-tabs button.flat {
    border-bottom: 2px solid transparent;
    color: var(--color-light);
}

.dark .flat-tabs button.flat:hover,
.dark .flat-tabs .flat.on {
    color: var(--color-verySoftCyan);
    border-bottom: 2px solid var(--color-verySoftCyan);
}

.umap-pictogram-category h6 {
    font-size: 1.3em;
}

.umap-pictogram-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 30px);
    justify-content: space-between;
    grid-gap: 5px;
}

.umap-pictogram-choice {
    width: 30px;
    height: 30px;
    line-height: 30px;
    cursor: pointer;
    background-color: var(--color-veryLightGray);
    text-align: center;
    margin-bottom: 5px;
    display: inline-block;
    color: var(--color-dark);
    font-weight: bold;
    overflow: hidden;
}

.umap-pictogram-choice img {
    vertical-align: middle;
    max-width: 24px;
}

.umap-pictogram-choice:hover,
.umap-color-picker span:hover {
    background-color: var(--color-lighterGray);
}

.umap-pictogram-choice.selected {
    box-shadow: inset 0 0 0 1px var(--color-lighterGray);
}

.umap-pictogram-choice .leaflet-marker-icon {
    bottom: 0;
    inset-inline-start: 30px;
    position: absolute;
}

.umap-color-picker {
    clear: both;
    margin-bottom: 20px;
    overflow: hidden;
}

.umap-color-picker span {
    width: 20px;
    height: 20px;
    display: block;
    padding: 0;
    margin: 0;
    cursor: pointer;
    float: inline-start;
}

input.blur {
    width: calc(100% - 40px);
    display: inline-block;
    vertical-align: middle;
    border-start-end-radius: 0;
    border-end-end-radius: 0;
    margin-bottom: 0;
}

.blur+.button,
.blur+[type="button"] {
    width: 40px;
    display: inline-block;
    vertical-align: middle;
    border-start-start-radius: 0;
    border-end-start-radius: 0;
    box-sizing: border-box;
    border: none;
}

input[type=hidden].blur+.button,
input[type=hidden].blur+[type="button"] {
    display: none;
}

.blur-container {
    display: flex;
    align-items: stretch;
}

.copiable-input {
    display: flex;
    align-items: end;
}

.copiable-input input {
    border-radius: initial;
}

.copiable-input button[type=button] {
    background-color: var(--background-color);
    color: var(--text-color);
    border: 2px solid var(--color-darkBlue);
    border-left: none;
    width: 40px;
    height: 40px;
}

input.highlightable:not(:placeholder-shown) {
    border: 1px solid var(--color-brightCyan);
}

.umap-import [type=url] {
    margin-bottom: 0;
}

.select-with-actions {
    display: flex;
    align-items: center;
}

.ternary-switch {
    --nb-of-items: 3;
    --fraction-width: calc(100%/var(--nb-of-items));
    position: relative;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: var(--color-veryLightGray);
    font-weight: bold;
    text-transform: uppercase;
    padding: var(--text-margin);
}

.ternary-switch input[type="radio"] {
    display: none;
}

.ternary-switch label {
    cursor: pointer;
    text-align: center;
}

.ternary-switch::before {
    content: '';
    position: absolute;
    left: 0;
    width: var(--fraction-width);
    height: 100%;
    transition: .5s left ease;
    background: transparent;
    border: 2px solid var(--color-mediumGray);
}

.ternary-switch:has(input[type="radio"]:nth-of-type(1):checked):before {
    left: 0%;
    border-color: var(--color-accent);
}

.ternary-switch:has(input[type="radio"]:nth-of-type(2):checked):before {
    left: var(--fraction-width);
}

.ternary-switch:has(input[type="radio"]:nth-of-type(3):checked):before {
    left: calc(var(--fraction-width) * 2);
    border-color: var(--color-accent);
}
